import Vue from 'vue'
import Router from 'vue-router'

const Home=()=>import('views/home/Home')
const Cart=()=>import('views/cart/Cart')
const Profile=()=>import('views/profile/Profile')
const Category=()=>import('views/category/Category')
const Detail=()=>import('views/detail/Detail')
// const CategoryLeft=()=>import("views/category/childComponents/CategoryLeft")

Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [
    {
      path: '/',
      redirect:'/home'
    },
    {
      path:'/home',
      component:Home
    },
    {
      path:'/category',
      component:Category
    },
    {
      path:'/cart',
      component:Cart
    },
    {
      path:'/profile',
      component:Profile
    },
    {
      path:'/detail/:id',
      component:Detail
    },
    // {
    //   path:'/subcategory/:maitKey',
    //   component:CategoryLeft
    // }
  ]
})
